<?php

namespace App\Services\User;

use App\Services\ProjectValidate;

/**
 * 当前模块验证规则集合
 *
 * Class ValidateMenuCate
 */
class ValidateMenuCate extends ProjectValidate {
    /**
     * 类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        // TODO: Implement initValidate() method.
        /*if (!empty($initData['status'])) {
            $this->rules['status']  = 'int:0,1,2';
        }*/
    }

    /**
     * @var array 验证规则集合
     */
    public $rules = [
        'id'            => 'int|min:1',
        'app_id'        => 'int|min:1',
        'name'          => 'alpha_dash|between:5,16',
        'name_cn'       => 'string|min:4|max:16'
    ];


    /**
     * @var array 当前验证错误信息
     */
    public $messages = [
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
        'id'        => 'ID',
    ];

}